import { requestClient } from '@/api/request';

export namespace LoginApi {
  /** 登录接口参数 */
  export interface LoginParams {
    account?: string;
    password?: string;
  }
}
/**
 * 登录获取token
 */
export async function loginApi(data: LoginApi.LoginParams) {
  return requestClient.post<BasicUserInfo>('/login/doLogin', data);
}

/**
 * 刷新token
 */
export async function refreshTokenApi() {
  return requestClient.post<BasicUserInfo>('/login/refreshToken');
}
